let loadindex = layer.load(1,{
    shade:[1,'#000']
})
// 发送ajax请求列表页数据
$.get('./php/list.php',res=>{
    let {meta:{status,msg},data} = res;
    if(status===0){
        var str = '';
        for(var i=0;i<data.length;i++){
            str += `
            <div class="col-md-3">
                <div class="thumbnail">
                    <a href="">
                        <img class="thumbnail-img" src="${data[i].imgpath.split('==========')[0]}" alt="...">
                    </a>
                    <div class="title text-center">${data[i].introduce}</div>
                    <div class="caption text-center">
                        <a href="detail.html?id=${data[i].id}" >
                            <button class="btn btn-default btn-categories-product-recommend">￥
                                <strong>${data[i].price}</strong> |立即购买
                            </button>
                        </a>
                    </div>
                    <div class="watermark">
                        <ul class="list-group">
                            <li class="list-group-item label label-warning">个性定制</li>
                        </ul>
                    </div>
                </div>
            </div>  
            `
        }
        $('.goods').html(str)
        // 关闭加载层
        layer.close(loadindex)
    }else{
        location.href = "home.html"
    }
},'json')